package MyObjectStream;

import java.io.*;

public class demo1 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("ddd.txt"));
        Student s = new Student("张三",23,"南京");
        oos.writeObject(s);
        oos.close();
    }
}
